Notes/Domino 6 and 7 Forum

Notes/Domino 6 and 7 Forum





continuing after exception on addDocument() in JAVA
~Joan Froweploponi 01/23/2004 08:27 PM
Domino Server All Releases Windows 2000


I'm adding documents to a documentCollection with the following code. I can't use dups. How am I suppose to return to the code when I hit a dupe?

Is return correct?

// with addrecipients we add the recipient to the recipientDocCollection
// from the recipientEntryCollection
void addRecipients(ViewEntryCollection vec) {

try {
ViewEntry tempRecipient = vec.getFirstEntry();

while (tempRecipient != null ) {
Document doc = tempRecipient.getDocument();
recipientDocCollection.addDocument(doc , true);

tempRecipient = vec.getNextEntry(tempRecipient);
}
} catch ( Exception e) {
System.err.println( e.getMessage() ); //e.printStackTrace();
return;
} // try
} //addRecipients

Go back